# coding: utf-8

"""
 twneru2
 Copyright (C) 2010 Satoshi Ueyama <gyuque@gmail.com>

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as
 published by the Free Software Foundation, either version 3 of the
 License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Affero General Public License for more details.

 You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

# 日の出、日の入り表
SUN_TABLE_ST = {
  '0101': (651, 1638), 
  '0102': (652, 1639), '0103': (652, 1640), '0104': (652, 1641), 
  '0105': (652, 1642), '0106': (652, 1642), '0107': (652, 1643), 
  '0108': (652, 1644), '0109': (652, 1645), '0110': (652, 1646), 
  '0111': (652, 1647), '0112': (652, 1648), '0113': (651, 1649), 
  '0114': (651, 1650), '0115': (651, 1651), '0116': (651, 1652), 
  '0117': (650, 1653), '0118': (650, 1654), '0119': (650, 1655), 
  '0120': (649, 1656), '0121': (649, 1657), '0122': (648, 1658), 
  '0123': (648, 1659), '0124': (647, 1700), '0125': (647, 1701), 
  '0126': (646, 1702), '0127': (645, 1703), '0128': (645, 1704), 
  '0129': (644, 1705), '0130': (643, 1706), '0131': (643, 1707), 
  '0201': (642, 1708), '0202': (641, 1709), '0203': (640, 1710), 
  '0204': (640, 1712), '0205': (639, 1713), '0206': (638, 1714), 
  '0207': (637, 1715), '0208': (636, 1716), '0209': (635, 1717), 
  '0210': (634, 1718), '0211': (633, 1719), '0212': (632, 1720), 
  '0213': (631, 1721), '0214': (630, 1722), '0215': (629, 1723), 
  '0216': (628, 1724), '0217': (627, 1725), '0218': (625, 1726), 
  '0219': (624, 1727), '0220': (623, 1728), '0221': (622, 1729), 
  '0222': (621, 1730), '0223': (619, 1731), '0224': (618, 1732), 
  '0225': (617, 1732), '0226': (616, 1733), '0227': (614, 1734), 
  '0228': (613, 1735), '0229': (613, 1736), '0301': (612, 1736), '0302': (611, 1737), 
  '0303': (609, 1738), '0304': (608, 1739), '0305': (607, 1740), 
  '0306': (605, 1741), '0307': (604, 1742), '0308': (602, 1743), 
  '0309': (601, 1743), '0310': (600, 1744), '0311': (558, 1745), 
  '0312': (557, 1746), '0313': (556, 1747), '0314': (554, 1748), 
  '0315': (553, 1749), '0316': (551, 1750), '0317': (550, 1750), 
  '0318': (548, 1751), '0319': (547, 1752), '0320': (546, 1753), 
  '0321': (544, 1754), '0322': (543, 1755), '0323': (541, 1755), 
  '0324': (540, 1756), '0325': (538, 1757), '0326': (537, 1758), 
  '0327': (535, 1759), '0328': (534, 1800), '0329': (533, 1800), 
  '0330': (531, 1801), '0331': (530, 1802), '0401': (528, 1803), 
  '0402': (527, 1804), '0403': (525, 1805), '0404': (524, 1805), 
  '0405': (523, 1806), '0406': (521, 1807), '0407': (520, 1808), 
  '0408': (518, 1809), '0409': (517, 1810), '0410': (516, 1810), 
  '0411': (514, 1811), '0412': (513, 1812), '0413': (512, 1813), 
  '0414': (510, 1814), '0415': (509, 1815), '0416': (508, 1815), 
  '0417': (506, 1816), '0418': (505, 1817), '0419': (504, 1818), 
  '0420': (502, 1819), '0421': (501, 1820), '0422': (500, 1821), 
  '0423': (459, 1821), '0424': (458, 1822), '0425': (456, 1823), 
  '0426': (455, 1824), '0427': (454, 1825), '0428': (453, 1826), 
  '0429': (452, 1826), '0430': (451, 1827), '0501': (449, 1828), 
  '0502': (448, 1829), '0503': (447, 1830), '0504': (446, 1831), 
  '0505': (445, 1831), '0506': (444, 1832), '0507': (443, 1833), 
  '0508': (442, 1834), '0509': (441, 1835), '0510': (440, 1836), 
  '0511': (440, 1836), '0512': (439, 1837), '0513': (438, 1838), 
  '0514': (437, 1839), '0515': (436, 1840), '0516': (435, 1841), 
  '0517': (435, 1841), '0518': (434, 1842), '0519': (433, 1843), 
  '0520': (433, 1844), '0521': (432, 1844), '0522': (431, 1845), 
  '0523': (431, 1846), '0524': (430, 1847), '0525': (430, 1847), 
  '0526': (429, 1848), '0527': (429, 1849), '0528': (428, 1850), 
  '0529': (428, 1850), '0530': (427, 1851), '0531': (427, 1852), 
  '0601': (426, 1852), '0602': (426, 1853), '0603': (426, 1853), 
  '0604': (426, 1854), '0605': (425, 1855), '0606': (425, 1855), 
  '0607': (425, 1856), '0608': (425, 1856), '0609': (425, 1857), 
  '0610': (425, 1857), '0611': (424, 1858), '0612': (424, 1858), 
  '0613': (424, 1859), '0614': (424, 1859), '0615': (424, 1859), 
  '0616': (425, 1900), '0617': (425, 1900), '0618': (425, 1900), 
  '0619': (425, 1901), '0620': (425, 1901), '0621': (425, 1901), 
  '0622': (425, 1901), '0623': (426, 1901), '0624': (426, 1902), 
  '0625': (426, 1902), '0626': (427, 1902), '0627': (427, 1902), 
  '0628': (427, 1902), '0629': (428, 1902), '0630': (428, 1902), 
  '0701': (428, 1902), '0702': (429, 1902), '0703': (429, 1902), 
  '0704': (430, 1901), '0705': (430, 1901), '0706': (431, 1901), 
  '0707': (431, 1901), '0708': (432, 1901), '0709': (433, 1900), 
  '0710': (433, 1900), '0711': (434, 1900), '0712': (434, 1859), 
  '0713': (435, 1859), '0714': (436, 1859), '0715': (436, 1858), 
  '0716': (437, 1858), '0717': (438, 1857), '0718': (438, 1857), 
  '0719': (439, 1856), '0720': (440, 1855), '0721': (440, 1855), 
  '0722': (441, 1854), '0723': (442, 1854), '0724': (443, 1853), 
  '0725': (443, 1852), '0726': (444, 1851), '0727': (445, 1851), 
  '0728': (446, 1850), '0729': (446, 1849), '0730': (447, 1848), 
  '0731': (448, 1847), '0801': (449, 1846), '0802': (449, 1845), 
  '0803': (450, 1844), '0804': (451, 1844), '0805': (452, 1843), 
  '0806': (453, 1842), '0807': (453, 1841), '0808': (454, 1839), 
  '0809': (455, 1838), '0810': (456, 1837), '0811': (457, 1836), 
  '0812': (457, 1835), '0813': (458, 1834), '0814': (459, 1833), 
  '0815': (500, 1832), '0816': (500, 1830), '0817': (501, 1829), 
  '0818': (502, 1828), '0819': (503, 1827), '0820': (504, 1825), 
  '0821': (504, 1824), '0822': (505, 1823), '0823': (506, 1822), 
  '0824': (507, 1820), '0825': (508, 1819), '0826': (508, 1818), 
  '0827': (509, 1816), '0828': (510, 1815), '0829': (511, 1814), 
  '0830': (511, 1812), '0831': (512, 1811), '0901': (513, 1809), 
  '0902': (514, 1808), '0903': (514, 1807), '0904': (515, 1805), 
  '0905': (516, 1804), '0906': (517, 1802), '0907': (517, 1801), 
  '0908': (518, 1759), '0909': (519, 1758), '0910': (520, 1757), 
  '0911': (521, 1755), '0912': (521, 1754), '0913': (522, 1752), 
  '0914': (523, 1751), '0915': (524, 1749), '0916': (524, 1748), 
  '0917': (525, 1746), '0918': (526, 1745), '0919': (527, 1743), 
  '0920': (527, 1742), '0921': (528, 1740), '0922': (529, 1739), 
  '0923': (530, 1737), '0924': (530, 1736), '0925': (531, 1734), 
  '0926': (532, 1733), '0927': (533, 1732), '0928': (534, 1730), 
  '0929': (534, 1729), '0930': (535, 1727), '1001': (536, 1726), 
  '1002': (537, 1724), '1003': (538, 1723), '1004': (538, 1721), 
  '1005': (539, 1720), '1006': (540, 1719), '1007': (541, 1717), 
  '1008': (542, 1716), '1009': (543, 1714), '1010': (543, 1713), 
  '1011': (544, 1712), '1012': (545, 1710), '1013': (546, 1709), 
  '1014': (547, 1708), '1015': (548, 1706), '1016': (549, 1705), 
  '1017': (549, 1704), '1018': (550, 1702), '1019': (551, 1701), 
  '1020': (552, 1700), '1021': (553, 1659), '1022': (554, 1657), 
  '1023': (555, 1656), '1024': (556, 1655), '1025': (557, 1654), 
  '1026': (558, 1653), '1027': (558, 1652), '1028': (559, 1651), 
  '1029': (600, 1649), '1030': (601, 1648), '1031': (602, 1647), 
  '1101': (603, 1646), '1102': (604, 1645), '1103': (605, 1644), 
  '1104': (606, 1643), '1105': (607, 1642), '1106': (608, 1642), 
  '1107': (609, 1641), '1108': (610, 1640), '1109': (611, 1639), 
  '1110': (612, 1638), '1111': (613, 1637), '1112': (614, 1637), 
  '1113': (615, 1636), '1114': (616, 1635), '1115': (617, 1634), 
  '1116': (618, 1634), '1117': (619, 1633), '1118': (620, 1633), 
  '1119': (621, 1632), '1120': (622, 1632), '1121': (623, 1631), 
  '1122': (624, 1631), '1123': (625, 1630), '1124': (626, 1630), 
  '1125': (627, 1629), '1126': (628, 1629), '1127': (629, 1629), 
  '1128': (630, 1628), '1129': (631, 1628), '1130': (632, 1628), 
  '1201': (633, 1628), '1202': (634, 1628), '1203': (634, 1628), 
  '1204': (635, 1628), '1205': (636, 1627), '1206': (637, 1627), 
  '1207': (638, 1627), '1208': (639, 1628), '1209': (639, 1628), 
  '1210': (640, 1628), '1211': (641, 1628), '1212': (642, 1628), 
  '1213': (642, 1628), '1214': (643, 1629), '1215': (644, 1629), 
  '1216': (645, 1629), '1217': (645, 1630), '1218': (646, 1630), 
  '1219': (646, 1630), '1220': (647, 1631), '1221': (647, 1631), 
  '1222': (648, 1632), '1223': (648, 1632), '1224': (649, 1633), 
  '1225': (649, 1633), '1226': (650, 1634), '1227': (650, 1635), 
  '1228': (650, 1635), '1229': (651, 1636), '1230': (651, 1637), 
  '1231': (651, 1637)
}

SUN_TABLE_SP = {
  '0101': (706, 1610),
  '0102': (706, 1611),
  '0103': (706, 1612),
  '0104': (706, 1613),
  '0105': (706, 1614),
  '0106': (706, 1615),
  '0107': (706, 1616),
  '0108': (706, 1617),
  '0109': (705, 1618),
  '0110': (705, 1619),
  '0111': (705, 1620),
  '0112': (705, 1621),
  '0113': (704, 1623),
  '0114': (704, 1624),
  '0115': (703, 1625),
  '0116': (703, 1626),
  '0117': (702, 1627),
  '0118': (702, 1629),
  '0119': (701, 1630),
  '0120': (700, 1631),
  '0121': (700, 1632),
  '0122': (659, 1634),
  '0123': (658, 1635),
  '0124': (658, 1636),
  '0125': (657, 1637),
  '0126': (656, 1639),
  '0127': (655, 1640),
  '0128': (654, 1641),
  '0129': (653, 1643),
  '0130': (652, 1644),
  '0131': (651, 1645),
  '0201': (650, 1647),
  '0202': (649, 1648),
  '0203': (648, 1649),
  '0204': (647, 1651),
  '0205': (646, 1652),
  '0206': (644, 1653),
  '0207': (643, 1655),
  '0208': (642, 1656),
  '0209': (641, 1657),
  '0210': (639, 1659),
  '0211': (638, 1700),
  '0212': (637, 1701),
  '0213': (635, 1703),
  '0214': (634, 1704),
  '0215': (633, 1705),
  '0216': (631, 1707),
  '0217': (630, 1708),
  '0218': (628, 1709),
  '0219': (627, 1711),
  '0220': (625, 1712),
  '0221': (624, 1713),
  '0222': (622, 1715),
  '0223': (621, 1716),
  '0224': (619, 1717),
  '0225': (618, 1718),
  '0226': (616, 1720),
  '0227': (614, 1721),
  '0228': (613, 1722),
  '0229': (612, 1722),
  '0301': (611, 1723),
  '0302': (610, 1725),
  '0303': (608, 1726),
  '0304': (606, 1727),
  '0305': (605, 1728),
  '0306': (603, 1730),
  '0307': (601, 1731),
  '0308': (559, 1732),
  '0309': (558, 1733),
  '0310': (556, 1735),
  '0311': (554, 1736),
  '0312': (553, 1737),
  '0313': (551, 1738),
  '0314': (549, 1739),
  '0315': (547, 1741),
  '0316': (546, 1742),
  '0317': (544, 1743),
  '0318': (542, 1744),
  '0319': (540, 1745),
  '0320': (538, 1747),
  '0321': (537, 1748),
  '0322': (535, 1749),
  '0323': (533, 1750),
  '0324': (531, 1751),
  '0325': (530, 1752),
  '0326': (528, 1754),
  '0327': (526, 1755),
  '0328': (524, 1756),
  '0329': (523, 1757),
  '0330': (521, 1758),
  '0331': (519, 1759),
  '0401': (517, 1801),
  '0402': (515, 1802),
  '0403': (514, 1803),
  '0404': (512, 1804),
  '0405': (510, 1805),
  '0406': (509, 1806),
  '0407': (507, 1808),
  '0408': (505, 1809),
  '0409': (503, 1810),
  '0410': (502, 1811),
  '0411': (500, 1812),
  '0412': (458, 1813),
  '0413': (457, 1815),
  '0414': (455, 1816),
  '0415': (453, 1817),
  '0416': (452, 1818),
  '0417': (450, 1819),
  '0418': (448, 1820),
  '0419': (447, 1822),
  '0420': (445, 1823),
  '0421': (444, 1824),
  '0422': (442, 1825),
  '0423': (441, 1826),
  '0424': (439, 1827),
  '0425': (437, 1828),
  '0426': (436, 1830),
  '0427': (435, 1831),
  '0428': (433, 1832),
  '0429': (432, 1833),
  '0430': (430, 1834),
  '0501': (429, 1835),
  '0502': (427, 1837),
  '0503': (426, 1838),
  '0504': (425, 1839),
  '0505': (423, 1840),
  '0506': (422, 1841),
  '0507': (421, 1842),
  '0508': (420, 1843),
  '0509': (418, 1844),
  '0510': (417, 1846),
  '0511': (416, 1847),
  '0512': (415, 1848),
  '0513': (414, 1849),
  '0514': (413, 1850),
  '0515': (412, 1851),
  '0516': (410, 1852),
  '0517': (409, 1853),
  '0518': (408, 1854),
  '0519': (408, 1855),
  '0520': (407, 1856),
  '0521': (406, 1857),
  '0522': (405, 1858),
  '0523': (404, 1859),
  '0524': (403, 1900),
  '0525': (402, 1901),
  '0526': (402, 1902),
  '0527': (401, 1903),
  '0528': (400, 1904),
  '0529': (400, 1905),
  '0530': (359, 1905),
  '0531': (359, 1906),
  '0601': (358, 1907),
  '0602': (358, 1908),
  '0603': (357, 1909),
  '0604': (357, 1909),
  '0605': (356, 1910),
  '0606': (356, 1911),
  '0607': (356, 1911),
  '0608': (355, 1912),
  '0609': (355, 1913),
  '0610': (355, 1913),
  '0611': (355, 1914),
  '0612': (355, 1914),
  '0613': (355, 1915),
  '0614': (355, 1915),
  '0615': (354, 1916),
  '0616': (354, 1916),
  '0617': (355, 1916),
  '0618': (355, 1917),
  '0619': (355, 1917),
  '0620': (355, 1917),
  '0621': (355, 1918),
  '0622': (355, 1918),
  '0623': (356, 1918),
  '0624': (356, 1918),
  '0625': (356, 1918),
  '0626': (357, 1918),
  '0627': (357, 1918),
  '0628': (357, 1918),
  '0629': (358, 1918),
  '0630': (358, 1918),
  '0701': (359, 1918),
  '0702': (359, 1918),
  '0703': (400, 1918),
  '0704': (400, 1917),
  '0705': (401, 1917),
  '0706': (402, 1917),
  '0707': (402, 1916),
  '0708': (403, 1916),
  '0709': (404, 1916),
  '0710': (404, 1915),
  '0711': (405, 1915),
  '0712': (406, 1914),
  '0713': (407, 1913),
  '0714': (408, 1913),
  '0715': (408, 1912),
  '0716': (409, 1912),
  '0717': (410, 1911),
  '0718': (411, 1910),
  '0719': (412, 1909),
  '0720': (413, 1909),
  '0721': (414, 1908),
  '0722': (415, 1907),
  '0723': (416, 1906),
  '0724': (417, 1905),
  '0725': (418, 1904),
  '0726': (419, 1903),
  '0727': (420, 1902),
  '0728': (421, 1901),
  '0729': (422, 1900),
  '0730': (423, 1859),
  '0731': (424, 1858),
  '0801': (425, 1856),
  '0802': (426, 1855),
  '0803': (427, 1854),
  '0804': (428, 1853),
  '0805': (429, 1852),
  '0806': (430, 1850),
  '0807': (431, 1849),
  '0808': (432, 1848),
  '0809': (433, 1846),
  '0810': (434, 1845),
  '0811': (435, 1843),
  '0812': (437, 1842),
  '0813': (438, 1841),
  '0814': (439, 1839),
  '0815': (440, 1838),
  '0816': (441, 1836),
  '0817': (442, 1835),
  '0818': (443, 1833),
  '0819': (444, 1832),
  '0820': (445, 1830),
  '0821': (446, 1828),
  '0822': (447, 1827),
  '0823': (449, 1825),
  '0824': (450, 1824),
  '0825': (451, 1822),
  '0826': (452, 1820),
  '0827': (453, 1819),
  '0828': (454, 1817),
  '0829': (455, 1815),
  '0830': (456, 1814),
  '0831': (457, 1812),
  '0901': (458, 1810),
  '0902': (500, 1808),
  '0903': (501, 1807),
  '0904': (502, 1805),
  '0905': (503, 1803),
  '0906': (504, 1801),
  '0907': (505, 1800),
  '0908': (506, 1758),
  '0909': (507, 1756),
  '0910': (508, 1754),
  '0911': (509, 1753),
  '0912': (510, 1751),
  '0913': (511, 1749),
  '0914': (513, 1747),
  '0915': (514, 1745),
  '0916': (515, 1744),
  '0917': (516, 1742),
  '0918': (517, 1740),
  '0919': (518, 1738),
  '0920': (519, 1736),
  '0921': (520, 1735),
  '0922': (521, 1733),
  '0923': (522, 1731),
  '0924': (524, 1729),
  '0925': (525, 1727),
  '0926': (526, 1726),
  '0927': (527, 1724),
  '0928': (528, 1722),
  '0929': (529, 1720),
  '0930': (530, 1718),
  '1001': (531, 1717),
  '1002': (533, 1715),
  '1003': (534, 1713),
  '1004': (535, 1711),
  '1005': (536, 1710),
  '1006': (537, 1708),
  '1007': (538, 1706),
  '1008': (539, 1704),
  '1009': (541, 1703),
  '1010': (542, 1701),
  '1011': (543, 1659),
  '1012': (544, 1658),
  '1013': (545, 1656),
  '1014': (546, 1654),
  '1015': (548, 1653),
  '1016': (549, 1651),
  '1017': (550, 1649),
  '1018': (551, 1648),
  '1019': (552, 1646),
  '1020': (554, 1645),
  '1021': (555, 1643),
  '1022': (556, 1642),
  '1023': (557, 1640),
  '1024': (559, 1638),
  '1025': (600, 1637),
  '1026': (601, 1636),
  '1027': (602, 1634),
  '1028': (604, 1633),
  '1029': (605, 1631),
  '1030': (606, 1630),
  '1031': (607, 1629),
  '1101': (609, 1627),
  '1102': (610, 1626),
  '1103': (611, 1625),
  '1104': (612, 1623),
  '1105': (614, 1622),
  '1106': (615, 1621),
  '1107': (616, 1620),
  '1108': (618, 1619),
  '1109': (619, 1617),
  '1110': (620, 1616),
  '1111': (621, 1615),
  '1112': (623, 1614),
  '1113': (624, 1613),
  '1114': (625, 1612),
  '1115': (627, 1611),
  '1116': (628, 1610),
  '1117': (629, 1610),
  '1118': (630, 1609),
  '1119': (632, 1608),
  '1120': (633, 1607),
  '1121': (634, 1606),
  '1122': (635, 1606),
  '1123': (637, 1605),
  '1124': (638, 1604),
  '1125': (639, 1604),
  '1126': (640, 1603),
  '1127': (641, 1603),
  '1128': (642, 1602),
  '1129': (644, 1602),
  '1130': (645, 1601),
  '1201': (646, 1601),
  '1202': (647, 1601),
  '1203': (648, 1600),
  '1204': (649, 1600),
  '1205': (650, 1600),
  '1206': (651, 1600),
  '1207': (652, 1600),
  '1208': (653, 1600),
  '1209': (654, 1600),
  '1210': (655, 1600),
  '1211': (656, 1600),
  '1212': (656, 1600),
  '1213': (657, 1600),
  '1214': (658, 1600),
  '1215': (659, 1600),
  '1216': (659, 1601),
  '1217': (700, 1601),
  '1218': (701, 1601),
  '1219': (701, 1602),
  '1220': (702, 1602),
  '1221': (703, 1603),
  '1222': (703, 1603),
  '1223': (704, 1604),
  '1224': (704, 1604),
  '1225': (704, 1605),
  '1226': (705, 1605),
  '1227': (705, 1606),
  '1228': (705, 1607),
  '1229': (706, 1608),
  '1230': (706, 1608),
  '1231': (706, 1609)
}

SUN_TABLE_NG = {
  '0101': (659, 1642),
  '0102': (700, 1643),
  '0103': (700, 1644),
  '0104': (700, 1645),
  '0105': (700, 1645),
  '0106': (700, 1646),
  '0107': (700, 1647),
  '0108': (700, 1648),
  '0109': (700, 1649),
  '0110': (700, 1650),
  '0111': (700, 1651),
  '0112': (659, 1652),
  '0113': (659, 1653),
  '0114': (659, 1654),
  '0115': (659, 1655),
  '0116': (658, 1656),
  '0117': (658, 1657),
  '0118': (658, 1658),
  '0119': (657, 1659),
  '0120': (657, 1700),
  '0121': (656, 1701),
  '0122': (656, 1702),
  '0123': (655, 1703),
  '0124': (655, 1704),
  '0125': (654, 1705),
  '0126': (654, 1706),
  '0127': (653, 1707),
  '0128': (652, 1708),
  '0129': (652, 1710),
  '0130': (651, 1711),
  '0131': (650, 1712),
  '0201': (649, 1713),
  '0202': (649, 1714),
  '0203': (648, 1715),
  '0204': (647, 1716),
  '0205': (646, 1717),
  '0206': (645, 1718),
  '0207': (644, 1719),
  '0208': (643, 1720),
  '0209': (642, 1721),
  '0210': (641, 1722),
  '0211': (640, 1723),
  '0212': (639, 1724),
  '0213': (638, 1725),
  '0214': (637, 1727),
  '0215': (636, 1728),
  '0216': (635, 1729),
  '0217': (633, 1730),
  '0218': (632, 1731),
  '0219': (631, 1732),
  '0220': (630, 1733),
  '0221': (629, 1734),
  '0222': (627, 1735),
  '0223': (626, 1736),
  '0224': (625, 1737),
  '0225': (624, 1738),
  '0226': (622, 1739),
  '0227': (621, 1740),
  '0228': (620, 1741),
  '0229': (619, 1741),
  '0301': (618, 1741),
  '0302': (617, 1742),
  '0303': (616, 1743),
  '0304': (614, 1744),
  '0305': (613, 1745),
  '0306': (612, 1746),
  '0307': (610, 1747),
  '0308': (609, 1748),
  '0309': (607, 1749),
  '0310': (606, 1750),
  '0311': (604, 1751),
  '0312': (603, 1752),
  '0313': (602, 1753),
  '0314': (600, 1754),
  '0315': (559, 1754),
  '0316': (557, 1755),
  '0317': (556, 1756),
  '0318': (554, 1757),
  '0319': (553, 1758),
  '0320': (551, 1759),
  '0321': (550, 1800),
  '0322': (548, 1801),
  '0323': (547, 1801),
  '0324': (545, 1802),
  '0325': (544, 1803),
  '0326': (543, 1804),
  '0327': (541, 1805),
  '0328': (540, 1806),
  '0329': (538, 1807),
  '0330': (537, 1808),
  '0331': (535, 1808),
  '0401': (534, 1809),
  '0402': (532, 1810),
  '0403': (531, 1811),
  '0404': (529, 1812),
  '0405': (528, 1813),
  '0406': (527, 1814),
  '0407': (525, 1814),
  '0408': (524, 1815),
  '0409': (522, 1816),
  '0410': (521, 1817),
  '0411': (519, 1818),
  '0412': (518, 1819),
  '0413': (517, 1820),
  '0414': (515, 1821),
  '0415': (514, 1821),
  '0416': (513, 1822),
  '0417': (511, 1823),
  '0418': (510, 1824),
  '0419': (509, 1825),
  '0420': (507, 1826),
  '0421': (506, 1827),
  '0422': (505, 1828),
  '0423': (503, 1828),
  '0424': (502, 1829),
  '0425': (501, 1830),
  '0426': (500, 1831),
  '0427': (459, 1832),
  '0428': (457, 1833),
  '0429': (456, 1834),
  '0430': (455, 1835),
  '0501': (454, 1835),
  '0502': (453, 1836),
  '0503': (452, 1837),
  '0504': (451, 1838),
  '0505': (450, 1839),
  '0506': (449, 1840),
  '0507': (448, 1841),
  '0508': (447, 1841),
  '0509': (446, 1842),
  '0510': (445, 1843),
  '0511': (444, 1844),
  '0512': (443, 1845),
  '0513': (442, 1846),
  '0514': (441, 1847),
  '0515': (440, 1847),
  '0516': (439, 1848),
  '0517': (439, 1849),
  '0518': (438, 1850),
  '0519': (437, 1851),
  '0520': (436, 1851),
  '0521': (436, 1852),
  '0522': (435, 1853),
  '0523': (435, 1854),
  '0524': (434, 1855),
  '0525': (433, 1855),
  '0526': (433, 1856),
  '0527': (432, 1857),
  '0528': (432, 1858),
  '0529': (431, 1858),
  '0530': (431, 1859),
  '0531': (431, 1900),
  '0601': (430, 1900),
  '0602': (430, 1901),
  '0603': (430, 1902),
  '0604': (429, 1902),
  '0605': (429, 1903),
  '0606': (429, 1903),
  '0607': (429, 1904),
  '0608': (428, 1904),
  '0609': (428, 1905),
  '0610': (428, 1905),
  '0611': (428, 1906),
  '0612': (428, 1906),
  '0613': (428, 1907),
  '0614': (428, 1907),
  '0615': (428, 1907),
  '0616': (428, 1908),
  '0617': (428, 1908),
  '0618': (428, 1908),
  '0619': (428, 1909),
  '0620': (429, 1909),
  '0621': (429, 1909),
  '0622': (429, 1909),
  '0623': (429, 1910),
  '0624': (430, 1910),
  '0625': (430, 1910),
  '0626': (430, 1910),
  '0627': (430, 1910),
  '0628': (431, 1910),
  '0629': (431, 1910),
  '0630': (432, 1910),
  '0701': (432, 1910),
  '0702': (433, 1910),
  '0703': (433, 1910),
  '0704': (433, 1910),
  '0705': (434, 1909),
  '0706': (435, 1909),
  '0707': (435, 1909),
  '0708': (436, 1909),
  '0709': (436, 1908),
  '0710': (437, 1908),
  '0711': (437, 1908),
  '0712': (438, 1907),
  '0713': (439, 1907),
  '0714': (439, 1907),
  '0715': (440, 1906),
  '0716': (441, 1906),
  '0717': (441, 1905),
  '0718': (442, 1904),
  '0719': (443, 1904),
  '0720': (444, 1903),
  '0721': (444, 1903),
  '0722': (445, 1902),
  '0723': (446, 1901),
  '0724': (447, 1901),
  '0725': (447, 1900),
  '0726': (448, 1859),
  '0727': (449, 1858),
  '0728': (450, 1857),
  '0729': (450, 1857),
  '0730': (451, 1856),
  '0731': (452, 1855),
  '0801': (453, 1854),
  '0802': (454, 1853),
  '0803': (454, 1852),
  '0804': (455, 1851),
  '0805': (456, 1850),
  '0806': (457, 1849),
  '0807': (458, 1848),
  '0808': (459, 1847),
  '0809': (459, 1846),
  '0810': (500, 1845),
  '0811': (501, 1843),
  '0812': (502, 1842),
  '0813': (503, 1841),
  '0814': (503, 1840),
  '0815': (504, 1839),
  '0816': (505, 1838),
  '0817': (506, 1836),
  '0818': (507, 1835),
  '0819': (508, 1834),
  '0820': (508, 1832),
  '0821': (509, 1831),
  '0822': (510, 1830),
  '0823': (511, 1829),
  '0824': (512, 1827),
  '0825': (512, 1826),
  '0826': (513, 1824),
  '0827': (514, 1823),
  '0828': (515, 1822),
  '0829': (516, 1820),
  '0830': (516, 1819),
  '0831': (517, 1818),
  '0901': (518, 1816),
  '0902': (519, 1815),
  '0903': (520, 1813),
  '0904': (520, 1812),
  '0905': (521, 1810),
  '0906': (522, 1809),
  '0907': (523, 1807),
  '0908': (524, 1806),
  '0909': (524, 1804),
  '0910': (525, 1803),
  '0911': (526, 1801),
  '0912': (527, 1800),
  '0913': (528, 1758),
  '0914': (528, 1757),
  '0915': (529, 1755),
  '0916': (530, 1754),
  '0917': (531, 1752),
  '0918': (532, 1751),
  '0919': (532, 1749),
  '0920': (533, 1748),
  '0921': (534, 1746),
  '0922': (535, 1745),
  '0923': (536, 1743),
  '0924': (536, 1742),
  '0925': (537, 1740),
  '0926': (538, 1739),
  '0927': (539, 1737),
  '0928': (540, 1736),
  '0929': (540, 1734),
  '0930': (541, 1733),
  '1001': (542, 1731),
  '1002': (543, 1730),
  '1003': (544, 1728),
  '1004': (545, 1727),
  '1005': (545, 1726),
  '1006': (546, 1724),
  '1007': (547, 1723),
  '1008': (548, 1721),
  '1009': (549, 1720),
  '1010': (550, 1718),
  '1011': (551, 1717),
  '1012': (552, 1716),
  '1013': (552, 1714),
  '1014': (553, 1713),
  '1015': (554, 1711),
  '1016': (555, 1710),
  '1017': (556, 1709),
  '1018': (557, 1708),
  '1019': (558, 1706),
  '1020': (559, 1705),
  '1021': (600, 1704),
  '1022': (601, 1702),
  '1023': (602, 1701),
  '1024': (603, 1700),
  '1025': (604, 1659),
  '1026': (604, 1658),
  '1027': (605, 1656),
  '1028': (606, 1655),
  '1029': (607, 1654),
  '1030': (608, 1653),
  '1031': (609, 1652),
  '1101': (610, 1651),
  '1102': (611, 1650),
  '1103': (612, 1649),
  '1104': (613, 1648),
  '1105': (614, 1647),
  '1106': (615, 1646),
  '1107': (616, 1645),
  '1108': (617, 1644),
  '1109': (618, 1643),
  '1110': (619, 1642),
  '1111': (620, 1642),
  '1112': (622, 1641),
  '1113': (623, 1640),
  '1114': (624, 1639),
  '1115': (625, 1639),
  '1116': (626, 1638),
  '1117': (627, 1637),
  '1118': (628, 1637),
  '1119': (629, 1636),
  '1120': (630, 1636),
  '1121': (631, 1635),
  '1122': (632, 1635),
  '1123': (633, 1634),
  '1124': (634, 1634),
  '1125': (635, 1633),
  '1126': (636, 1633),
  '1127': (637, 1633),
  '1128': (638, 1632),
  '1129': (639, 1632),
  '1130': (640, 1632),
  '1201': (641, 1632),
  '1202': (641, 1632),
  '1203': (642, 1631),
  '1204': (643, 1631),
  '1205': (644, 1631),
  '1206': (645, 1631),
  '1207': (646, 1631),
  '1208': (647, 1631),
  '1209': (647, 1631),
  '1210': (648, 1632),
  '1211': (649, 1632),
  '1212': (650, 1632),
  '1213': (651, 1632),
  '1214': (651, 1632),
  '1215': (652, 1633),
  '1216': (653, 1633),
  '1217': (653, 1633),
  '1218': (654, 1634),
  '1219': (654, 1634),
  '1220': (655, 1634),
  '1221': (656, 1635),
  '1222': (656, 1635),
  '1223': (656, 1636),
  '1224': (657, 1637),
  '1225': (657, 1637),
  '1226': (658, 1638),
  '1227': (658, 1638),
  '1228': (658, 1639),
  '1229': (659, 1640),
  '1230': (659, 1640),
  '1231': (659, 1641)
}

SUN_TABLE_TK = {
  '0101': (651, 1639),
  '0102': (651, 1639),
  '0103': (651, 1640),
  '0104': (651, 1641),
  '0105': (651, 1642),
  '0106': (651, 1643),
  '0107': (651, 1643),
  '0108': (651, 1644),
  '0109': (651, 1645),
  '0110': (651, 1646),
  '0111': (651, 1647),
  '0112': (651, 1648),
  '0113': (651, 1649),
  '0114': (650, 1650),
  '0115': (650, 1651),
  '0116': (650, 1652),
  '0117': (650, 1653),
  '0118': (649, 1654),
  '0119': (649, 1655),
  '0120': (648, 1656),
  '0121': (648, 1657),
  '0122': (647, 1658),
  '0123': (647, 1659),
  '0124': (646, 1700),
  '0125': (646, 1701),
  '0126': (645, 1702),
  '0127': (645, 1703),
  '0128': (644, 1704),
  '0129': (643, 1705),
  '0130': (643, 1706),
  '0131': (642, 1707),
  '0201': (641, 1708),
  '0202': (640, 1709),
  '0203': (640, 1710),
  '0204': (639, 1711),
  '0205': (638, 1713),
  '0206': (637, 1714),
  '0207': (636, 1715),
  '0208': (635, 1716),
  '0209': (634, 1717),
  '0210': (633, 1718),
  '0211': (632, 1719),
  '0212': (631, 1720),
  '0213': (630, 1721),
  '0214': (629, 1722),
  '0215': (628, 1723),
  '0216': (627, 1724),
  '0217': (626, 1725),
  '0218': (625, 1726),
  '0219': (624, 1727),
  '0220': (623, 1728),
  '0221': (621, 1728),
  '0222': (620, 1729),
  '0223': (619, 1730),
  '0224': (618, 1731),
  '0225': (616, 1732),
  '0226': (615, 1733),
  '0227': (614, 1734),
  '0228': (613, 1735),
  '0229': (612, 1735),
  '0301': (611, 1736),
  '0302': (610, 1737),
  '0303': (609, 1738),
  '0304': (607, 1739),
  '0305': (606, 1740),
  '0306': (605, 1741),
  '0307': (603, 1741),
  '0308': (602, 1742),
  '0309': (601, 1743),
  '0310': (559, 1744),
  '0311': (558, 1745),
  '0312': (556, 1746),
  '0313': (555, 1747),
  '0314': (554, 1747),
  '0315': (552, 1748),
  '0316': (551, 1749),
  '0317': (549, 1750),
  '0318': (548, 1751),
  '0319': (547, 1752),
  '0320': (545, 1753),
  '0321': (544, 1753),
  '0322': (542, 1754),
  '0323': (541, 1755),
  '0324': (539, 1756),
  '0325': (538, 1757),
  '0326': (537, 1758),
  '0327': (535, 1758),
  '0328': (534, 1759),
  '0329': (532, 1800),
  '0330': (531, 1801),
  '0331': (529, 1802),
  '0401': (528, 1803),
  '0402': (527, 1803),
  '0403': (525, 1804),
  '0404': (524, 1805),
  '0405': (522, 1806),
  '0406': (521, 1807),
  '0407': (520, 1807),
  '0408': (518, 1808),
  '0409': (517, 1809),
  '0410': (515, 1810),
  '0411': (514, 1811),
  '0412': (513, 1812),
  '0413': (511, 1812),
  '0414': (510, 1813),
  '0415': (509, 1814),
  '0416': (507, 1815),
  '0417': (506, 1816),
  '0418': (505, 1817),
  '0419': (504, 1817),
  '0420': (502, 1818),
  '0421': (501, 1819),
  '0422': (500, 1820),
  '0423': (459, 1821),
  '0424': (457, 1822),
  '0425': (456, 1822),
  '0426': (455, 1823),
  '0427': (454, 1824),
  '0428': (453, 1825),
  '0429': (452, 1826),
  '0430': (451, 1827),
  '0501': (449, 1827),
  '0502': (448, 1828),
  '0503': (447, 1829),
  '0504': (446, 1830),
  '0505': (445, 1831),
  '0506': (444, 1832),
  '0507': (443, 1832),
  '0508': (442, 1833),
  '0509': (441, 1834),
  '0510': (440, 1835),
  '0511': (440, 1836),
  '0512': (439, 1837),
  '0513': (438, 1837),
  '0514': (437, 1838),
  '0515': (436, 1839),
  '0516': (435, 1840),
  '0517': (435, 1841),
  '0518': (434, 1841),
  '0519': (433, 1842),
  '0520': (433, 1843),
  '0521': (432, 1844),
  '0522': (431, 1844),
  '0523': (431, 1845),
  '0524': (430, 1846),
  '0525': (430, 1847),
  '0526': (429, 1847),
  '0527': (429, 1848),
  '0528': (428, 1849),
  '0529': (428, 1849),
  '0530': (427, 1850),
  '0531': (427, 1851),
  '0601': (427, 1851),
  '0602': (426, 1852),
  '0603': (426, 1853),
  '0604': (426, 1853),
  '0605': (425, 1854),
  '0606': (425, 1854),
  '0607': (425, 1855),
  '0608': (425, 1855),
  '0609': (425, 1856),
  '0610': (425, 1856),
  '0611': (425, 1857),
  '0612': (425, 1857),
  '0613': (425, 1858),
  '0614': (425, 1858),
  '0615': (425, 1858),
  '0616': (425, 1859),
  '0617': (425, 1859),
  '0618': (425, 1859),
  '0619': (425, 1900),
  '0620': (425, 1900),
  '0621': (425, 1900),
  '0622': (426, 1900),
  '0623': (426, 1900),
  '0624': (426, 1901),
  '0625': (426, 1901),
  '0626': (427, 1901),
  '0627': (427, 1901),
  '0628': (427, 1901),
  '0629': (428, 1901),
  '0630': (428, 1901),
  '0701': (429, 1901),
  '0702': (429, 1901),
  '0703': (430, 1901),
  '0704': (430, 1901),
  '0705': (431, 1900),
  '0706': (431, 1900),
  '0707': (432, 1900),
  '0708': (432, 1900),
  '0709': (433, 1900),
  '0710': (433, 1859),
  '0711': (434, 1859),
  '0712': (434, 1859),
  '0713': (435, 1858),
  '0714': (436, 1858),
  '0715': (436, 1857),
  '0716': (437, 1857),
  '0717': (438, 1856),
  '0718': (438, 1856),
  '0719': (439, 1855),
  '0720': (440, 1855),
  '0721': (440, 1854),
  '0722': (441, 1853),
  '0723': (442, 1853),
  '0724': (443, 1852),
  '0725': (443, 1851),
  '0726': (444, 1851),
  '0727': (445, 1850),
  '0728': (446, 1849),
  '0729': (446, 1848),
  '0730': (447, 1847),
  '0731': (448, 1846),
  '0801': (449, 1846),
  '0802': (449, 1845),
  '0803': (450, 1844),
  '0804': (451, 1843),
  '0805': (452, 1842),
  '0806': (453, 1841),
  '0807': (453, 1840),
  '0808': (454, 1839),
  '0809': (455, 1838),
  '0810': (456, 1837),
  '0811': (456, 1836),
  '0812': (457, 1834),
  '0813': (458, 1833),
  '0814': (459, 1832),
  '0815': (500, 1831),
  '0816': (500, 1830),
  '0817': (501, 1829),
  '0818': (502, 1827),
  '0819': (503, 1826),
  '0820': (504, 1825),
  '0821': (504, 1824),
  '0822': (505, 1822),
  '0823': (506, 1821),
  '0824': (507, 1820),
  '0825': (507, 1818),
  '0826': (508, 1817),
  '0827': (509, 1816),
  '0828': (510, 1814),
  '0829': (510, 1813),
  '0830': (511, 1812),
  '0831': (512, 1810),
  '0901': (513, 1809),
  '0902': (513, 1808),
  '0903': (514, 1806),
  '0904': (515, 1805),
  '0905': (516, 1803),
  '0906': (517, 1802),
  '0907': (517, 1800),
  '0908': (518, 1759),
  '0909': (519, 1758),
  '0910': (520, 1756),
  '0911': (520, 1755),
  '0912': (521, 1753),
  '0913': (522, 1752),
  '0914': (523, 1750),
  '0915': (523, 1749),
  '0916': (524, 1747),
  '0917': (525, 1746),
  '0918': (526, 1744),
  '0919': (526, 1743),
  '0920': (527, 1741),
  '0921': (528, 1740),
  '0922': (529, 1739),
  '0923': (529, 1737),
  '0924': (530, 1736),
  '0925': (531, 1734),
  '0926': (532, 1733),
  '0927': (532, 1731),
  '0928': (533, 1730),
  '0929': (534, 1728),
  '0930': (535, 1727),
  '1001': (536, 1725),
  '1002': (536, 1724),
  '1003': (537, 1723),
  '1004': (538, 1721),
  '1005': (539, 1720),
  '1006': (540, 1718),
  '1007': (540, 1717),
  '1008': (541, 1716),
  '1009': (542, 1714),
  '1010': (543, 1713),
  '1011': (544, 1711),
  '1012': (545, 1710),
  '1013': (545, 1709),
  '1014': (546, 1707),
  '1015': (547, 1706),
  '1016': (548, 1705),
  '1017': (549, 1704),
  '1018': (550, 1702),
  '1019': (551, 1701),
  '1020': (551, 1700),
  '1021': (552, 1659),
  '1022': (553, 1657),
  '1023': (554, 1656),
  '1024': (555, 1655),
  '1025': (556, 1654),
  '1026': (557, 1653),
  '1027': (558, 1652),
  '1028': (559, 1650),
  '1029': (600, 1649),
  '1030': (601, 1648),
  '1031': (602, 1647),
  '1101': (603, 1646),
  '1102': (604, 1645),
  '1103': (605, 1644),
  '1104': (605, 1643),
  '1105': (606, 1642),
  '1106': (607, 1641),
  '1107': (608, 1641),
  '1108': (609, 1640),
  '1109': (610, 1639),
  '1110': (611, 1638),
  '1111': (612, 1637),
  '1112': (613, 1637),
  '1113': (614, 1636),
  '1114': (615, 1635),
  '1115': (616, 1634),
  '1116': (617, 1634),
  '1117': (618, 1633),
  '1118': (619, 1633),
  '1119': (620, 1632),
  '1120': (621, 1632),
  '1121': (622, 1631),
  '1122': (623, 1631),
  '1123': (624, 1630),
  '1124': (625, 1630),
  '1125': (626, 1629),
  '1126': (627, 1629),
  '1127': (628, 1629),
  '1128': (629, 1629),
  '1129': (630, 1628),
  '1130': (631, 1628),
  '1201': (632, 1628),
  '1202': (633, 1628),
  '1203': (634, 1628),
  '1204': (634, 1628),
  '1205': (635, 1628),
  '1206': (636, 1628),
  '1207': (637, 1628),
  '1208': (638, 1628),
  '1209': (639, 1628),
  '1210': (639, 1628),
  '1211': (640, 1628),
  '1212': (641, 1628),
  '1213': (642, 1628),
  '1214': (642, 1629),
  '1215': (643, 1629),
  '1216': (644, 1629),
  '1217': (644, 1630),
  '1218': (645, 1630),
  '1219': (645, 1631),
  '1220': (646, 1631),
  '1221': (647, 1631),
  '1222': (647, 1632),
  '1223': (648, 1632),
  '1224': (648, 1633),
  '1225': (648, 1634),
  '1226': (649, 1634),
  '1227': (649, 1635),
  '1228': (650, 1635),
  '1229': (650, 1636),
  '1230': (650, 1637),
  '1231': (650, 1638)
}

SUN_TABLE_NY = {
  '0101': (701, 1651),
  '0102': (701, 1652),
  '0103': (701, 1653),
  '0104': (701, 1653),
  '0105': (701, 1654),
  '0106': (701, 1655),
  '0107': (701, 1656),
  '0108': (701, 1657),
  '0109': (701, 1658),
  '0110': (701, 1659),
  '0111': (701, 1700),
  '0112': (701, 1701),
  '0113': (701, 1701),
  '0114': (700, 1702),
  '0115': (700, 1703),
  '0116': (700, 1704),
  '0117': (700, 1705),
  '0118': (659, 1706),
  '0119': (659, 1707),
  '0120': (659, 1708),
  '0121': (658, 1709),
  '0122': (658, 1710),
  '0123': (657, 1711),
  '0124': (657, 1712),
  '0125': (656, 1713),
  '0126': (656, 1714),
  '0127': (655, 1715),
  '0128': (654, 1716),
  '0129': (654, 1717),
  '0130': (653, 1719),
  '0131': (652, 1720),
  '0201': (652, 1721),
  '0202': (651, 1722),
  '0203': (650, 1723),
  '0204': (649, 1724),
  '0205': (648, 1725),
  '0206': (648, 1726),
  '0207': (647, 1727),
  '0208': (646, 1728),
  '0209': (645, 1729),
  '0210': (644, 1730),
  '0211': (643, 1731),
  '0212': (642, 1732),
  '0213': (641, 1733),
  '0214': (640, 1734),
  '0215': (639, 1735),
  '0216': (638, 1736),
  '0217': (637, 1737),
  '0218': (636, 1737),
  '0219': (634, 1738),
  '0220': (633, 1739),
  '0221': (632, 1740),
  '0222': (631, 1741),
  '0223': (630, 1742),
  '0224': (629, 1743),
  '0225': (627, 1744),
  '0226': (626, 1745),
  '0227': (625, 1746),
  '0228': (624, 1747),
  '0229': (623, 1747),
  '0301': (622, 1748),
  '0302': (621, 1749),
  '0303': (620, 1749),
  '0304': (618, 1750),
  '0305': (617, 1751),
  '0306': (616, 1752),
  '0307': (614, 1753),
  '0308': (613, 1754),
  '0309': (612, 1755),
  '0310': (610, 1756),
  '0311': (609, 1756),
  '0312': (608, 1757),
  '0313': (606, 1758),
  '0314': (605, 1759),
  '0315': (603, 1800),
  '0316': (602, 1801),
  '0317': (601, 1801),
  '0318': (559, 1802),
  '0319': (558, 1803),
  '0320': (556, 1804),
  '0321': (555, 1805),
  '0322': (554, 1805),
  '0323': (552, 1806),
  '0324': (551, 1807),
  '0325': (549, 1808),
  '0326': (548, 1809),
  '0327': (547, 1810),
  '0328': (545, 1810),
  '0329': (544, 1811),
  '0330': (542, 1812),
  '0331': (541, 1813),
  '0401': (540, 1814),
  '0402': (538, 1814),
  '0403': (537, 1815),
  '0404': (535, 1816),
  '0405': (534, 1817),
  '0406': (533, 1818),
  '0407': (531, 1818),
  '0408': (530, 1819),
  '0409': (529, 1820),
  '0410': (527, 1821),
  '0411': (526, 1822),
  '0412': (525, 1822),
  '0413': (523, 1823),
  '0414': (522, 1824),
  '0415': (521, 1825),
  '0416': (519, 1826),
  '0417': (518, 1826),
  '0418': (517, 1827),
  '0419': (516, 1828),
  '0420': (514, 1829),
  '0421': (513, 1830),
  '0422': (512, 1830),
  '0423': (511, 1831),
  '0424': (509, 1832),
  '0425': (508, 1833),
  '0426': (507, 1834),
  '0427': (506, 1835),
  '0428': (505, 1835),
  '0429': (504, 1836),
  '0430': (503, 1837),
  '0501': (502, 1838),
  '0502': (501, 1839),
  '0503': (459, 1840),
  '0504': (458, 1840),
  '0505': (457, 1841),
  '0506': (456, 1842),
  '0507': (456, 1843),
  '0508': (455, 1844),
  '0509': (454, 1844),
  '0510': (453, 1845),
  '0511': (452, 1846),
  '0512': (451, 1847),
  '0513': (450, 1848),
  '0514': (449, 1848),
  '0515': (449, 1849),
  '0516': (448, 1850),
  '0517': (447, 1851),
  '0518': (446, 1851),
  '0519': (446, 1852),
  '0520': (445, 1853),
  '0521': (444, 1854),
  '0522': (444, 1855),
  '0523': (443, 1855),
  '0524': (443, 1856),
  '0525': (442, 1857),
  '0526': (442, 1857),
  '0527': (441, 1858),
  '0528': (441, 1859),
  '0529': (440, 1859),
  '0530': (440, 1900),
  '0531': (440, 1901),
  '0601': (439, 1901),
  '0602': (439, 1902),
  '0603': (439, 1903),
  '0604': (438, 1903),
  '0605': (438, 1904),
  '0606': (438, 1904),
  '0607': (438, 1905),
  '0608': (438, 1905),
  '0609': (437, 1906),
  '0610': (437, 1906),
  '0611': (437, 1907),
  '0612': (437, 1907),
  '0613': (437, 1908),
  '0614': (437, 1908),
  '0615': (437, 1908),
  '0616': (437, 1909),
  '0617': (437, 1909),
  '0618': (438, 1909),
  '0619': (438, 1910),
  '0620': (438, 1910),
  '0621': (438, 1910),
  '0622': (438, 1910),
  '0623': (439, 1910),
  '0624': (439, 1911),
  '0625': (439, 1911),
  '0626': (439, 1911),
  '0627': (440, 1911),
  '0628': (440, 1911),
  '0629': (441, 1911),
  '0630': (441, 1911),
  '0701': (441, 1911),
  '0702': (442, 1911),
  '0703': (442, 1911),
  '0704': (443, 1911),
  '0705': (443, 1910),
  '0706': (444, 1910),
  '0707': (444, 1910),
  '0708': (445, 1910),
  '0709': (445, 1909),
  '0710': (446, 1909),
  '0711': (446, 1909),
  '0712': (447, 1909),
  '0713': (448, 1908),
  '0714': (448, 1908),
  '0715': (449, 1907),
  '0716': (450, 1907),
  '0717': (450, 1906),
  '0718': (451, 1906),
  '0719': (452, 1905),
  '0720': (452, 1905),
  '0721': (453, 1904),
  '0722': (454, 1903),
  '0723': (454, 1903),
  '0724': (455, 1902),
  '0725': (456, 1901),
  '0726': (457, 1901),
  '0727': (457, 1900),
  '0728': (458, 1859),
  '0729': (459, 1858),
  '0730': (500, 1858),
  '0731': (500, 1857),
  '0801': (501, 1856),
  '0802': (502, 1855),
  '0803': (503, 1854),
  '0804': (503, 1853),
  '0805': (504, 1852),
  '0806': (505, 1851),
  '0807': (506, 1850),
  '0808': (506, 1849),
  '0809': (507, 1848),
  '0810': (508, 1847),
  '0811': (509, 1846),
  '0812': (509, 1845),
  '0813': (510, 1844),
  '0814': (511, 1843),
  '0815': (512, 1841),
  '0816': (512, 1840),
  '0817': (513, 1839),
  '0818': (514, 1838),
  '0819': (515, 1837),
  '0820': (516, 1835),
  '0821': (516, 1834),
  '0822': (517, 1833),
  '0823': (518, 1832),
  '0824': (519, 1830),
  '0825': (519, 1829),
  '0826': (520, 1828),
  '0827': (521, 1826),
  '0828': (522, 1825),
  '0829': (522, 1824),
  '0830': (523, 1822),
  '0831': (524, 1821),
  '0901': (525, 1820),
  '0902': (525, 1818),
  '0903': (526, 1817),
  '0904': (527, 1816),
  '0905': (527, 1814),
  '0906': (528, 1813),
  '0907': (529, 1811),
  '0908': (530, 1810),
  '0909': (530, 1809),
  '0910': (531, 1807),
  '0911': (532, 1806),
  '0912': (533, 1804),
  '0913': (533, 1803),
  '0914': (534, 1801),
  '0915': (535, 1800),
  '0916': (536, 1758),
  '0917': (536, 1757),
  '0918': (537, 1756),
  '0919': (538, 1754),
  '0920': (538, 1753),
  '0921': (539, 1751),
  '0922': (540, 1750),
  '0923': (541, 1748),
  '0924': (541, 1747),
  '0925': (542, 1745),
  '0926': (543, 1744),
  '0927': (544, 1743),
  '0928': (544, 1741),
  '0929': (545, 1740),
  '0930': (546, 1738),
  '1001': (547, 1737),
  '1002': (548, 1735),
  '1003': (548, 1734),
  '1004': (549, 1733),
  '1005': (550, 1731),
  '1006': (551, 1730),
  '1007': (551, 1728),
  '1008': (552, 1727),
  '1009': (553, 1726),
  '1010': (554, 1724),
  '1011': (555, 1723),
  '1012': (555, 1722),
  '1013': (556, 1720),
  '1014': (557, 1719),
  '1015': (558, 1718),
  '1016': (559, 1717),
  '1017': (600, 1715),
  '1018': (601, 1714),
  '1019': (601, 1713),
  '1020': (602, 1712),
  '1021': (603, 1710),
  '1022': (604, 1709),
  '1023': (605, 1708),
  '1024': (606, 1707),
  '1025': (607, 1706),
  '1026': (608, 1705),
  '1027': (609, 1704),
  '1028': (609, 1702),
  '1029': (610, 1701),
  '1030': (611, 1700),
  '1031': (612, 1659),
  '1101': (613, 1658),
  '1102': (614, 1657),
  '1103': (615, 1656),
  '1104': (616, 1655),
  '1105': (617, 1654),
  '1106': (618, 1654),
  '1107': (619, 1653),
  '1108': (620, 1652),
  '1109': (621, 1651),
  '1110': (622, 1650),
  '1111': (623, 1650),
  '1112': (624, 1649),
  '1113': (625, 1648),
  '1114': (626, 1647),
  '1115': (627, 1647),
  '1116': (628, 1646),
  '1117': (629, 1646),
  '1118': (630, 1645),
  '1119': (631, 1644),
  '1120': (632, 1644),
  '1121': (633, 1643),
  '1122': (633, 1643),
  '1123': (634, 1643),
  '1124': (635, 1642),
  '1125': (636, 1642),
  '1126': (637, 1642),
  '1127': (638, 1641),
  '1128': (639, 1641),
  '1129': (640, 1641),
  '1130': (641, 1641),
  '1201': (642, 1640),
  '1202': (643, 1640),
  '1203': (644, 1640),
  '1204': (645, 1640),
  '1205': (645, 1640),
  '1206': (646, 1640),
  '1207': (647, 1640),
  '1208': (648, 1640),
  '1209': (649, 1640),
  '1210': (649, 1640),
  '1211': (650, 1641),
  '1212': (651, 1641),
  '1213': (652, 1641),
  '1214': (652, 1641),
  '1215': (653, 1642),
  '1216': (654, 1642),
  '1217': (654, 1642),
  '1218': (655, 1643),
  '1219': (655, 1643),
  '1220': (656, 1644),
  '1221': (657, 1644),
  '1222': (657, 1645),
  '1223': (658, 1645),
  '1224': (658, 1646),
  '1225': (658, 1646),
  '1226': (659, 1647),
  '1227': (659, 1647),
  '1228': (700, 1648),
  '1229': (700, 1649),
  '1230': (700, 1649),
  '1231': (700, 1650)
}

SUN_TABLE_OS = {
  '0101': (705, 1658),
  '0102': (705, 1659),
  '0103': (705, 1700),
  '0104': (706, 1700),
  '0105': (706, 1701),
  '0106': (706, 1702),
  '0107': (706, 1703),
  '0108': (706, 1704),
  '0109': (706, 1705),
  '0110': (706, 1706),
  '0111': (706, 1707),
  '0112': (705, 1707),
  '0113': (705, 1708),
  '0114': (705, 1709),
  '0115': (705, 1710),
  '0116': (705, 1711),
  '0117': (704, 1712),
  '0118': (704, 1713),
  '0119': (704, 1714),
  '0120': (703, 1715),
  '0121': (703, 1716),
  '0122': (702, 1717),
  '0123': (702, 1718),
  '0124': (701, 1719),
  '0125': (701, 1720),
  '0126': (700, 1721),
  '0127': (700, 1722),
  '0128': (659, 1723),
  '0129': (659, 1724),
  '0130': (658, 1725),
  '0131': (657, 1726),
  '0201': (656, 1727),
  '0202': (656, 1728),
  '0203': (655, 1729),
  '0204': (654, 1730),
  '0205': (653, 1731),
  '0206': (652, 1732),
  '0207': (652, 1733),
  '0208': (651, 1734),
  '0209': (650, 1735),
  '0210': (649, 1736),
  '0211': (648, 1737),
  '0212': (647, 1738),
  '0213': (646, 1739),
  '0214': (645, 1740),
  '0215': (644, 1741),
  '0216': (643, 1742),
  '0217': (642, 1743),
  '0218': (641, 1744),
  '0219': (640, 1745),
  '0220': (638, 1746),
  '0221': (637, 1747),
  '0222': (636, 1747),
  '0223': (635, 1748),
  '0224': (634, 1749),
  '0225': (633, 1750),
  '0226': (631, 1751),
  '0227': (630, 1752),
  '0228': (629, 1753),
  '0229': (629, 1753),
  '0301': (628, 1754),
  '0302': (626, 1755),
  '0303': (625, 1756),
  '0304': (624, 1756),
  '0305': (623, 1757),
  '0306': (621, 1758),
  '0307': (620, 1759),
  '0308': (619, 1800),
  '0309': (617, 1801),
  '0310': (616, 1801),
  '0311': (615, 1802),
  '0312': (613, 1803),
  '0313': (612, 1804),
  '0314': (610, 1805),
  '0315': (609, 1806),
  '0316': (608, 1806),
  '0317': (606, 1807),
  '0318': (605, 1808),
  '0319': (604, 1809),
  '0320': (602, 1810),
  '0321': (601, 1810),
  '0322': (559, 1811),
  '0323': (558, 1812),
  '0324': (557, 1813),
  '0325': (555, 1814),
  '0326': (554, 1814),
  '0327': (552, 1815),
  '0328': (551, 1816),
  '0329': (550, 1817),
  '0330': (548, 1817),
  '0331': (547, 1818),
  '0401': (546, 1819),
  '0402': (544, 1820),
  '0403': (543, 1821),
  '0404': (541, 1821),
  '0405': (540, 1822),
  '0406': (539, 1823),
  '0407': (537, 1824),
  '0408': (536, 1825),
  '0409': (535, 1825),
  '0410': (533, 1826),
  '0411': (532, 1827),
  '0412': (531, 1828),
  '0413': (529, 1828),
  '0414': (528, 1829),
  '0415': (527, 1830),
  '0416': (526, 1831),
  '0417': (524, 1832),
  '0418': (523, 1832),
  '0419': (522, 1833),
  '0420': (521, 1834),
  '0421': (519, 1835),
  '0422': (518, 1836),
  '0423': (517, 1836),
  '0424': (516, 1837),
  '0425': (515, 1838),
  '0426': (514, 1839),
  '0427': (512, 1840),
  '0428': (511, 1840),
  '0429': (510, 1841),
  '0430': (509, 1842),
  '0501': (508, 1843),
  '0502': (507, 1844),
  '0503': (506, 1844),
  '0504': (505, 1845),
  '0505': (504, 1846),
  '0506': (503, 1847),
  '0507': (502, 1848),
  '0508': (501, 1848),
  '0509': (500, 1849),
  '0510': (459, 1850),
  '0511': (459, 1851),
  '0512': (458, 1852),
  '0513': (457, 1852),
  '0514': (456, 1853),
  '0515': (455, 1854),
  '0516': (455, 1855),
  '0517': (454, 1855),
  '0518': (453, 1856),
  '0519': (453, 1857),
  '0520': (452, 1858),
  '0521': (451, 1858),
  '0522': (451, 1859),
  '0523': (450, 1900),
  '0524': (450, 1901),
  '0525': (449, 1901),
  '0526': (449, 1902),
  '0527': (448, 1903),
  '0528': (448, 1903),
  '0529': (447, 1904),
  '0530': (447, 1905),
  '0531': (446, 1905),
  '0601': (446, 1906),
  '0602': (446, 1906),
  '0603': (446, 1907),
  '0604': (445, 1908),
  '0605': (445, 1908),
  '0606': (445, 1909),
  '0607': (445, 1909),
  '0608': (445, 1910),
  '0609': (444, 1910),
  '0610': (444, 1911),
  '0611': (444, 1911),
  '0612': (444, 1912),
  '0613': (444, 1912),
  '0614': (444, 1912),
  '0615': (444, 1913),
  '0616': (444, 1913),
  '0617': (445, 1913),
  '0618': (445, 1914),
  '0619': (445, 1914),
  '0620': (445, 1914),
  '0621': (445, 1914),
  '0622': (445, 1915),
  '0623': (446, 1915),
  '0624': (446, 1915),
  '0625': (446, 1915),
  '0626': (447, 1915),
  '0627': (447, 1915),
  '0628': (447, 1915),
  '0629': (448, 1915),
  '0630': (448, 1915),
  '0701': (448, 1915),
  '0702': (449, 1915),
  '0703': (449, 1915),
  '0704': (450, 1915),
  '0705': (450, 1915),
  '0706': (451, 1915),
  '0707': (451, 1914),
  '0708': (452, 1914),
  '0709': (452, 1914),
  '0710': (453, 1914),
  '0711': (453, 1913),
  '0712': (454, 1913),
  '0713': (455, 1913),
  '0714': (455, 1912),
  '0715': (456, 1912),
  '0716': (457, 1911),
  '0717': (457, 1911),
  '0718': (458, 1910),
  '0719': (459, 1910),
  '0720': (459, 1909),
  '0721': (500, 1909),
  '0722': (501, 1908),
  '0723': (501, 1907),
  '0724': (502, 1907),
  '0725': (503, 1906),
  '0726': (503, 1905),
  '0727': (504, 1905),
  '0728': (505, 1904),
  '0729': (506, 1903),
  '0730': (506, 1902),
  '0731': (507, 1901),
  '0801': (508, 1901),
  '0802': (509, 1900),
  '0803': (509, 1859),
  '0804': (510, 1858),
  '0805': (511, 1857),
  '0806': (511, 1856),
  '0807': (512, 1855),
  '0808': (513, 1854),
  '0809': (514, 1853),
  '0810': (514, 1852),
  '0811': (515, 1851),
  '0812': (516, 1850),
  '0813': (517, 1849),
  '0814': (517, 1848),
  '0815': (518, 1846),
  '0816': (519, 1845),
  '0817': (520, 1844),
  '0818': (520, 1843),
  '0819': (521, 1842),
  '0820': (522, 1841),
  '0821': (523, 1839),
  '0822': (523, 1838),
  '0823': (524, 1837),
  '0824': (525, 1836),
  '0825': (526, 1834),
  '0826': (526, 1833),
  '0827': (527, 1832),
  '0828': (528, 1830),
  '0829': (529, 1829),
  '0830': (529, 1828),
  '0831': (530, 1826),
  '0901': (531, 1825),
  '0902': (531, 1824),
  '0903': (532, 1822),
  '0904': (533, 1821),
  '0905': (534, 1820),
  '0906': (534, 1818),
  '0907': (535, 1817),
  '0908': (536, 1815),
  '0909': (536, 1814),
  '0910': (537, 1813),
  '0911': (538, 1811),
  '0912': (539, 1810),
  '0913': (539, 1808),
  '0914': (540, 1807),
  '0915': (541, 1805),
  '0916': (541, 1804),
  '0917': (542, 1803),
  '0918': (543, 1801),
  '0919': (544, 1800),
  '0920': (544, 1758),
  '0921': (545, 1757),
  '0922': (546, 1755),
  '0923': (546, 1754),
  '0924': (547, 1753),
  '0925': (548, 1751),
  '0926': (549, 1750),
  '0927': (549, 1748),
  '0928': (550, 1747),
  '0929': (551, 1746),
  '0930': (552, 1744),
  '1001': (552, 1743),
  '1002': (553, 1741),
  '1003': (554, 1740),
  '1004': (555, 1739),
  '1005': (555, 1737),
  '1006': (556, 1736),
  '1007': (557, 1734),
  '1008': (558, 1733),
  '1009': (558, 1732),
  '1010': (559, 1730),
  '1011': (600, 1729),
  '1012': (601, 1728),
  '1013': (602, 1727),
  '1014': (603, 1725),
  '1015': (603, 1724),
  '1016': (604, 1723),
  '1017': (605, 1721),
  '1018': (606, 1720),
  '1019': (607, 1719),
  '1020': (608, 1718),
  '1021': (608, 1717),
  '1022': (609, 1715),
  '1023': (610, 1714),
  '1024': (611, 1713),
  '1025': (612, 1712),
  '1026': (613, 1711),
  '1027': (614, 1710),
  '1028': (615, 1709),
  '1029': (615, 1708),
  '1030': (616, 1707),
  '1031': (617, 1706),
  '1101': (618, 1705),
  '1102': (619, 1704),
  '1103': (620, 1703),
  '1104': (621, 1702),
  '1105': (622, 1701),
  '1106': (623, 1700),
  '1107': (624, 1659),
  '1108': (625, 1658),
  '1109': (626, 1658),
  '1110': (627, 1657),
  '1111': (628, 1656),
  '1112': (629, 1655),
  '1113': (630, 1655),
  '1114': (630, 1654),
  '1115': (631, 1653),
  '1116': (632, 1653),
  '1117': (633, 1652),
  '1118': (634, 1652),
  '1119': (635, 1651),
  '1120': (636, 1651),
  '1121': (637, 1650),
  '1122': (638, 1650),
  '1123': (639, 1649),
  '1124': (640, 1649),
  '1125': (641, 1649),
  '1126': (642, 1648),
  '1127': (643, 1648),
  '1128': (644, 1648),
  '1129': (645, 1648),
  '1130': (646, 1647),
  '1201': (646, 1647),
  '1202': (647, 1647),
  '1203': (648, 1647),
  '1204': (649, 1647),
  '1205': (650, 1647),
  '1206': (651, 1647),
  '1207': (652, 1647),
  '1208': (652, 1647),
  '1209': (653, 1647),
  '1210': (654, 1647),
  '1211': (655, 1648),
  '1212': (655, 1648),
  '1213': (656, 1648),
  '1214': (657, 1648),
  '1215': (657, 1649),
  '1216': (658, 1649),
  '1217': (659, 1649),
  '1218': (659, 1650),
  '1219': (700, 1650),
  '1220': (700, 1651),
  '1221': (701, 1651),
  '1222': (702, 1652),
  '1223': (702, 1652),
  '1224': (702, 1653),
  '1225': (703, 1653),
  '1226': (703, 1654),
  '1227': (704, 1654),
  '1228': (704, 1655),
  '1229': (704, 1656),
  '1230': (705, 1656),
  '1231': (705, 1657)
}

SUN_TABLE_ME = {
  '0101': (717, 1706),
  '0102': (717, 1707),
  '0103': (717, 1707),
  '0104': (717, 1708),
  '0105': (717, 1709),
  '0106': (717, 1710),
  '0107': (717, 1711),
  '0108': (717, 1712),
  '0109': (717, 1713),
  '0110': (717, 1713),
  '0111': (717, 1714),
  '0112': (717, 1715),
  '0113': (717, 1716),
  '0114': (717, 1717),
  '0115': (716, 1718),
  '0116': (716, 1719),
  '0117': (716, 1720),
  '0118': (715, 1721),
  '0119': (715, 1722),
  '0120': (715, 1723),
  '0121': (714, 1724),
  '0122': (714, 1725),
  '0123': (713, 1726),
  '0124': (713, 1727),
  '0125': (712, 1728),
  '0126': (712, 1729),
  '0127': (711, 1730),
  '0128': (710, 1731),
  '0129': (710, 1732),
  '0130': (709, 1733),
  '0131': (708, 1734),
  '0201': (708, 1735),
  '0202': (707, 1737),
  '0203': (706, 1738),
  '0204': (705, 1739),
  '0205': (704, 1740),
  '0206': (704, 1741),
  '0207': (703, 1742),
  '0208': (702, 1743),
  '0209': (701, 1744),
  '0210': (700, 1745),
  '0211': (659, 1746),
  '0212': (658, 1747),
  '0213': (657, 1748),
  '0214': (656, 1749),
  '0215': (655, 1750),
  '0216': (654, 1751),
  '0217': (652, 1752),
  '0218': (651, 1753),
  '0219': (650, 1754),
  '0220': (649, 1755),
  '0221': (648, 1755),
  '0222': (647, 1756),
  '0223': (645, 1757),
  '0224': (644, 1758),
  '0225': (643, 1759),
  '0226': (642, 1800),
  '0227': (641, 1801),
  '0228': (639, 1802),
  '0229': (639, 1802),
  '0301': (638, 1803),
  '0302': (637, 1804),
  '0303': (635, 1805),
  '0304': (634, 1806),
  '0305': (633, 1807),
  '0306': (631, 1807),
  '0307': (630, 1808),
  '0308': (629, 1809),
  '0309': (627, 1810),
  '0310': (626, 1811),
  '0311': (625, 1812),
  '0312': (623, 1813),
  '0313': (622, 1813),
  '0314': (620, 1814),
  '0315': (619, 1815),
  '0316': (618, 1816),
  '0317': (616, 1817),
  '0318': (615, 1818),
  '0319': (613, 1818),
  '0320': (612, 1819),
  '0321': (610, 1820),
  '0322': (609, 1821),
  '0323': (608, 1822),
  '0324': (606, 1823),
  '0325': (605, 1823),
  '0326': (603, 1824),
  '0327': (602, 1825),
  '0328': (601, 1826),
  '0329': (559, 1827),
  '0330': (558, 1828),
  '0331': (556, 1828),
  '0401': (555, 1829),
  '0402': (553, 1830),
  '0403': (552, 1831),
  '0404': (551, 1832),
  '0405': (549, 1832),
  '0406': (548, 1833),
  '0407': (547, 1834),
  '0408': (545, 1835),
  '0409': (544, 1836),
  '0410': (542, 1837),
  '0411': (541, 1837),
  '0412': (540, 1838),
  '0413': (538, 1839),
  '0414': (537, 1840),
  '0415': (536, 1841),
  '0416': (534, 1841),
  '0417': (533, 1842),
  '0418': (532, 1843),
  '0419': (531, 1844),
  '0420': (529, 1845),
  '0421': (528, 1846),
  '0422': (527, 1846),
  '0423': (526, 1847),
  '0424': (524, 1848),
  '0425': (523, 1849),
  '0426': (522, 1850),
  '0427': (521, 1851),
  '0428': (520, 1851),
  '0429': (519, 1852),
  '0430': (518, 1853),
  '0501': (517, 1854),
  '0502': (515, 1855),
  '0503': (514, 1856),
  '0504': (513, 1856),
  '0505': (512, 1857),
  '0506': (511, 1858),
  '0507': (510, 1859),
  '0508': (509, 1900),
  '0509': (509, 1900),
  '0510': (508, 1901),
  '0511': (507, 1902),
  '0512': (506, 1903),
  '0513': (505, 1904),
  '0514': (504, 1905),
  '0515': (503, 1905),
  '0516': (503, 1906),
  '0517': (502, 1907),
  '0518': (501, 1908),
  '0519': (500, 1908),
  '0520': (500, 1909),
  '0521': (459, 1910),
  '0522': (459, 1911),
  '0523': (458, 1911),
  '0524': (457, 1912),
  '0525': (457, 1913),
  '0526': (456, 1914),
  '0527': (456, 1914),
  '0528': (455, 1915),
  '0529': (455, 1916),
  '0530': (455, 1916),
  '0531': (454, 1917),
  '0601': (454, 1918),
  '0602': (454, 1918),
  '0603': (453, 1919),
  '0604': (453, 1919),
  '0605': (453, 1920),
  '0606': (453, 1921),
  '0607': (452, 1921),
  '0608': (452, 1922),
  '0609': (452, 1922),
  '0610': (452, 1923),
  '0611': (452, 1923),
  '0612': (452, 1923),
  '0613': (452, 1924),
  '0614': (452, 1924),
  '0615': (452, 1925),
  '0616': (452, 1925),
  '0617': (452, 1925),
  '0618': (452, 1926),
  '0619': (452, 1926),
  '0620': (453, 1926),
  '0621': (453, 1926),
  '0622': (453, 1927),
  '0623': (453, 1927),
  '0624': (453, 1927),
  '0625': (454, 1927),
  '0626': (454, 1927),
  '0627': (454, 1927),
  '0628': (455, 1927),
  '0629': (455, 1927),
  '0630': (456, 1927),
  '0701': (456, 1927),
  '0702': (456, 1927),
  '0703': (457, 1927),
  '0704': (457, 1927),
  '0705': (458, 1927),
  '0706': (458, 1926),
  '0707': (459, 1926),
  '0708': (459, 1926),
  '0709': (500, 1926),
  '0710': (501, 1925),
  '0711': (501, 1925),
  '0712': (502, 1925),
  '0713': (502, 1924),
  '0714': (503, 1924),
  '0715': (504, 1924),
  '0716': (504, 1923),
  '0717': (505, 1923),
  '0718': (506, 1922),
  '0719': (506, 1921),
  '0720': (507, 1921),
  '0721': (508, 1920),
  '0722': (508, 1920),
  '0723': (509, 1919),
  '0724': (510, 1918),
  '0725': (511, 1918),
  '0726': (511, 1917),
  '0727': (512, 1916),
  '0728': (513, 1915),
  '0729': (514, 1915),
  '0730': (514, 1914),
  '0731': (515, 1913),
  '0801': (516, 1912),
  '0802': (517, 1911),
  '0803': (517, 1910),
  '0804': (518, 1909),
  '0805': (519, 1908),
  '0806': (520, 1907),
  '0807': (521, 1906),
  '0808': (521, 1905),
  '0809': (522, 1904),
  '0810': (523, 1903),
  '0811': (524, 1902),
  '0812': (524, 1901),
  '0813': (525, 1900),
  '0814': (526, 1859),
  '0815': (527, 1857),
  '0816': (527, 1856),
  '0817': (528, 1855),
  '0818': (529, 1854),
  '0819': (530, 1853),
  '0820': (531, 1851),
  '0821': (531, 1850),
  '0822': (532, 1849),
  '0823': (533, 1848),
  '0824': (534, 1846),
  '0825': (534, 1845),
  '0826': (535, 1844),
  '0827': (536, 1842),
  '0828': (537, 1841),
  '0829': (537, 1840),
  '0830': (538, 1838),
  '0831': (539, 1837),
  '0901': (540, 1835),
  '0902': (540, 1834),
  '0903': (541, 1833),
  '0904': (542, 1831),
  '0905': (543, 1830),
  '0906': (543, 1828),
  '0907': (544, 1827),
  '0908': (545, 1826),
  '0909': (546, 1824),
  '0910': (546, 1823),
  '0911': (547, 1821),
  '0912': (548, 1820),
  '0913': (549, 1818),
  '0914': (549, 1817),
  '0915': (550, 1815),
  '0916': (551, 1814),
  '0917': (552, 1813),
  '0918': (552, 1811),
  '0919': (553, 1810),
  '0920': (554, 1808),
  '0921': (555, 1807),
  '0922': (555, 1805),
  '0923': (556, 1804),
  '0924': (557, 1802),
  '0925': (558, 1801),
  '0926': (558, 1759),
  '0927': (559, 1758),
  '0928': (600, 1757),
  '0929': (601, 1755),
  '0930': (602, 1754),
  '1001': (602, 1752),
  '1002': (603, 1751),
  '1003': (604, 1749),
  '1004': (605, 1748),
  '1005': (605, 1747),
  '1006': (606, 1745),
  '1007': (607, 1744),
  '1008': (608, 1742),
  '1009': (609, 1741),
  '1010': (610, 1740),
  '1011': (610, 1738),
  '1012': (611, 1737),
  '1013': (612, 1736),
  '1014': (613, 1734),
  '1015': (614, 1733),
  '1016': (615, 1732),
  '1017': (615, 1730),
  '1018': (616, 1729),
  '1019': (617, 1728),
  '1020': (618, 1727),
  '1021': (619, 1726),
  '1022': (620, 1724),
  '1023': (621, 1723),
  '1024': (622, 1722),
  '1025': (623, 1721),
  '1026': (623, 1720),
  '1027': (624, 1719),
  '1028': (625, 1717),
  '1029': (626, 1716),
  '1030': (627, 1715),
  '1031': (628, 1714),
  '1101': (629, 1713),
  '1102': (630, 1712),
  '1103': (631, 1711),
  '1104': (632, 1710),
  '1105': (633, 1709),
  '1106': (634, 1709),
  '1107': (635, 1708),
  '1108': (636, 1707),
  '1109': (637, 1706),
  '1110': (638, 1705),
  '1111': (639, 1704),
  '1112': (640, 1704),
  '1113': (641, 1703),
  '1114': (642, 1702),
  '1115': (643, 1702),
  '1116': (644, 1701),
  '1117': (645, 1700),
  '1118': (646, 1700),
  '1119': (647, 1659),
  '1120': (648, 1659),
  '1121': (649, 1658),
  '1122': (650, 1658),
  '1123': (651, 1657),
  '1124': (652, 1657),
  '1125': (653, 1657),
  '1126': (653, 1656),
  '1127': (654, 1656),
  '1128': (655, 1656),
  '1129': (656, 1656),
  '1130': (657, 1655),
  '1201': (658, 1655),
  '1202': (659, 1655),
  '1203': (700, 1655),
  '1204': (701, 1655),
  '1205': (702, 1655),
  '1206': (702, 1655),
  '1207': (703, 1655),
  '1208': (704, 1655),
  '1209': (705, 1655),
  '1210': (706, 1655),
  '1211': (706, 1655),
  '1212': (707, 1656),
  '1213': (708, 1656),
  '1214': (709, 1656),
  '1215': (709, 1656),
  '1216': (710, 1657),
  '1217': (711, 1657),
  '1218': (711, 1657),
  '1219': (712, 1658),
  '1220': (712, 1658),
  '1221': (713, 1659),
  '1222': (713, 1659),
  '1223': (714, 1700),
  '1224': (714, 1700),
  '1225': (715, 1701),
  '1226': (715, 1701),
  '1227': (715, 1702),
  '1228': (716, 1703),
  '1229': (716, 1703),
  '1230': (716, 1704),
  '1231': (717, 1705)
}

SUN_TABLE_FK = {
  '0101': (723, 1721), 
  '0102': (723, 1722), '0103': (723, 1723), '0104': (723, 1724), 
  '0105': (723, 1724), '0106': (723, 1725), '0107': (723, 1726), 
  '0108': (723, 1727), '0109': (723, 1728), '0110': (723, 1729), 
  '0111': (723, 1729), '0112': (723, 1730), '0113': (723, 1731), 
  '0114': (723, 1732), '0115': (723, 1733), '0116': (722, 1734), 
  '0117': (722, 1735), '0118': (722, 1736), '0119': (722, 1737), 
  '0120': (721, 1738), '0121': (721, 1739), '0122': (720, 1740), 
  '0123': (720, 1741), '0124': (720, 1742), '0125': (719, 1743), 
  '0126': (719, 1744), '0127': (718, 1745), '0128': (717, 1746), 
  '0129': (717, 1747), '0130': (716, 1748), '0131': (716, 1748), 
  '0201': (715, 1749), '0202': (714, 1750), '0203': (713, 1751), 
  '0204': (713, 1752), '0205': (712, 1753), '0206': (711, 1754), 
  '0207': (710, 1755), '0208': (709, 1756), '0209': (708, 1757), 
  '0210': (708, 1758), '0211': (707, 1759), '0212': (706, 1800), 
  '0213': (705, 1801), '0214': (704, 1802), '0215': (703, 1803), 
  '0216': (702, 1804), '0217': (701, 1804), '0218': (700, 1805), 
  '0219': (659, 1806), '0220': (658, 1807), '0221': (656, 1808), 
  '0222': (655, 1809), '0223': (654, 1810), '0224': (653, 1811), 
  '0225': (652, 1812), '0226': (651, 1812), '0227': (650, 1813), 
  '0228': (648, 1814), '0229': (648, 1814), '0301': (647, 1815), '0302': (646, 1816), 
  '0303': (645, 1817), '0304': (643, 1817), '0305': (642, 1818), 
  '0306': (641, 1819), '0307': (640, 1820), '0308': (638, 1821), 
  '0309': (637, 1821), '0310': (636, 1822), '0311': (635, 1823), 
  '0312': (633, 1824), '0313': (632, 1825), '0314': (631, 1825), 
  '0315': (629, 1826), '0316': (628, 1827), '0317': (627, 1828), 
  '0318': (625, 1828), '0319': (624, 1829), '0320': (623, 1830), 
  '0321': (621, 1831), '0322': (620, 1831), '0323': (619, 1832), 
  '0324': (617, 1833), '0325': (616, 1834), '0326': (614, 1834), 
  '0327': (613, 1835), '0328': (612, 1836), '0329': (610, 1837), 
  '0330': (609, 1837), '0331': (608, 1838), '0401': (606, 1839), 
  '0402': (605, 1840), '0403': (604, 1840), '0404': (602, 1841), 
  '0405': (601, 1842), '0406': (600, 1842), '0407': (559, 1843), 
  '0408': (557, 1844), '0409': (556, 1845), '0410': (555, 1845), 
  '0411': (553, 1846), '0412': (552, 1847), '0413': (551, 1848), 
  '0414': (550, 1848), '0415': (548, 1849), '0416': (547, 1850), 
  '0417': (546, 1851), '0418': (545, 1851), '0419': (543, 1852), 
  '0420': (542, 1853), '0421': (541, 1854), '0422': (540, 1854), 
  '0423': (539, 1855), '0424': (538, 1856), '0425': (537, 1857), 
  '0426': (535, 1857), '0427': (534, 1858), '0428': (533, 1859), 
  '0429': (532, 1900), '0430': (531, 1901), '0501': (530, 1901), 
  '0502': (529, 1902), '0503': (528, 1903), '0504': (527, 1904), 
  '0505': (526, 1904), '0506': (525, 1905), '0507': (525, 1906), 
  '0508': (524, 1907), '0509': (523, 1907), '0510': (522, 1908), 
  '0511': (521, 1909), '0512': (520, 1910), '0513': (520, 1910), 
  '0514': (519, 1911), '0515': (518, 1912), '0516': (517, 1913), 
  '0517': (517, 1913), '0518': (516, 1914), '0519': (515, 1915), 
  '0520': (515, 1915), '0521': (514, 1916), '0522': (514, 1917), 
  '0523': (513, 1918), '0524': (512, 1918), '0525': (512, 1919), 
  '0526': (512, 1920), '0527': (511, 1920), '0528': (511, 1921), 
  '0529': (510, 1922), '0530': (510, 1922), '0531': (510, 1923), 
  '0601': (509, 1923), '0602': (509, 1924), '0603': (509, 1925), 
  '0604': (509, 1925), '0605': (508, 1926), '0606': (508, 1926), 
  '0607': (508, 1927), '0608': (508, 1927), '0609': (508, 1928), 
  '0610': (508, 1928), '0611': (508, 1929), '0612': (508, 1929), 
  '0613': (508, 1929), '0614': (508, 1930), '0615': (508, 1930), 
  '0616': (508, 1930), '0617': (508, 1931), '0618': (508, 1931), 
  '0619': (508, 1931), '0620': (508, 1932), '0621': (509, 1932), 
  '0622': (509, 1932), '0623': (509, 1932), '0624': (509, 1932), 
  '0625': (510, 1932), '0626': (510, 1933), '0627': (510, 1933), 
  '0628': (511, 1933), '0629': (511, 1933), '0630': (511, 1933), 
  '0701': (512, 1933), '0702': (512, 1933), '0703': (513, 1933), 
  '0704': (513, 1932), '0705': (513, 1932), '0706': (514, 1932), 
  '0707': (514, 1932), '0708': (515, 1932), '0709': (515, 1931), 
  '0710': (516, 1931), '0711': (517, 1931), '0712': (517, 1931), 
  '0713': (518, 1930), '0714': (518, 1930), '0715': (519, 1929), 
  '0716': (520, 1929), '0717': (520, 1929), '0718': (521, 1928), 
  '0719': (521, 1928), '0720': (522, 1927), '0721': (523, 1926), 
  '0722': (523, 1926), '0723': (524, 1925), '0724': (525, 1925), 
  '0725': (525, 1924), '0726': (526, 1923), '0727': (527, 1923), 
  '0728': (528, 1922), '0729': (528, 1921), '0730': (529, 1920), 
  '0731': (530, 1920), '0801': (530, 1919), '0802': (531, 1918), 
  '0803': (532, 1917), '0804': (532, 1916), '0805': (533, 1915), 
  '0806': (534, 1914), '0807': (535, 1913), '0808': (535, 1912), 
  '0809': (536, 1911), '0810': (537, 1910), '0811': (537, 1909), 
  '0812': (538, 1908), '0813': (539, 1907), '0814': (540, 1906), 
  '0815': (540, 1905), '0816': (541, 1904), '0817': (542, 1903), 
  '0818': (542, 1902), '0819': (543, 1901), '0820': (544, 1859), 
  '0821': (544, 1858), '0822': (545, 1857), '0823': (546, 1856), 
  '0824': (547, 1855), '0825': (547, 1853), '0826': (548, 1852), 
  '0827': (549, 1851), '0828': (549, 1850), '0829': (550, 1848), 
  '0830': (551, 1847), '0831': (551, 1846), '0901': (552, 1844), 
  '0902': (553, 1843), '0903': (553, 1842), '0904': (554, 1840), 
  '0905': (555, 1839), '0906': (555, 1838), '0907': (556, 1836), 
  '0908': (557, 1835), '0909': (557, 1834), '0910': (558, 1832), 
  '0911': (559, 1831), '0912': (559, 1830), '0913': (600, 1828), 
  '0914': (601, 1827), '0915': (601, 1825), '0916': (602, 1824), 
  '0917': (603, 1823), '0918': (603, 1821), '0919': (604, 1820), 
  '0920': (605, 1818), '0921': (605, 1817), '0922': (606, 1816), 
  '0923': (607, 1814), '0924': (608, 1813), '0925': (608, 1812), 
  '0926': (609, 1810), '0927': (610, 1809), '0928': (610, 1807), 
  '0929': (611, 1806), '0930': (612, 1805), '1001': (612, 1803), 
  '1002': (613, 1802), '1003': (614, 1801), '1004': (615, 1759), 
  '1005': (615, 1758), '1006': (616, 1757), '1007': (617, 1755), 
  '1008': (617, 1754), '1009': (618, 1753), '1010': (619, 1751), 
  '1011': (620, 1750), '1012': (620, 1749), '1013': (621, 1748), 
  '1014': (622, 1746), '1015': (623, 1745), '1016': (624, 1744), 
  '1017': (624, 1743), '1018': (625, 1742), '1019': (626, 1740), 
  '1020': (627, 1739), '1021': (628, 1738), '1022': (628, 1737), 
  '1023': (629, 1736), '1024': (630, 1735), '1025': (631, 1734), 
  '1026': (632, 1733), '1027': (633, 1732), '1028': (633, 1731), 
  '1029': (634, 1730), '1030': (635, 1729), '1031': (636, 1728), 
  '1101': (637, 1727), '1102': (638, 1726), '1103': (639, 1725), 
  '1104': (640, 1724), '1105': (640, 1723), '1106': (641, 1722), 
  '1107': (642, 1721), '1108': (643, 1721), '1109': (644, 1720), 
  '1110': (645, 1719), '1111': (646, 1719), '1112': (647, 1718), 
  '1113': (648, 1717), '1114': (649, 1717), '1115': (650, 1716), 
  '1116': (651, 1715), '1117': (652, 1715), '1118': (652, 1714), 
  '1119': (653, 1714), '1120': (654, 1713), '1121': (655, 1713), 
  '1122': (656, 1713), '1123': (657, 1712), '1124': (658, 1712), 
  '1125': (659, 1711), '1126': (700, 1711), '1127': (701, 1711), 
  '1128': (702, 1711), '1129': (702, 1711), '1130': (703, 1710), 
  '1201': (704, 1710), '1202': (705, 1710), '1203': (706, 1710), 
  '1204': (707, 1710), '1205': (708, 1710), '1206': (708, 1710), 
  '1207': (709, 1710), '1208': (710, 1710), '1209': (711, 1710), 
  '1210': (712, 1711), '1211': (712, 1711), '1212': (713, 1711), 
  '1213': (714, 1711), '1214': (714, 1711), '1215': (715, 1712), 
  '1216': (716, 1712), '1217': (716, 1712), '1218': (717, 1713), 
  '1219': (717, 1713), '1220': (718, 1714), '1221': (719, 1714), 
  '1222': (719, 1715), '1223': (720, 1715), '1224': (720, 1716), 
  '1225': (720, 1716), '1226': (721, 1717), '1227': (721, 1718), 
  '1228': (722, 1718), '1229': (722, 1719), '1230': (722, 1720), 
  '1231': (722, 1720)
}

SUN_TABLES = {
  'saitama': SUN_TABLE_ST,
  'sapporo': SUN_TABLE_SP,
  'tokyo' : SUN_TABLE_TK,
  'nagano': SUN_TABLE_NG,
  'osaka' : SUN_TABLE_OS,
  'nagoya': SUN_TABLE_NY,
  'matsue': SUN_TABLE_ME,
  'fukuoka': SUN_TABLE_FK
}

LOCATION_DISP_NAMES = {
  'sapporo':  '札幌',
  'tokyo':  '東京',
  'saitama':'さいたま',
  'nagano': '長野',
  'nagoya': '名古屋',
  'osaka':  '大阪',
  'matsue': '松江',
  'fukuoka': '福岡'
}

def get_location_id(n):
  if (n == u'長野'):
    return 'nagano'
  elif (n == u'埼玉' or n == u'さいたま'):
    return 'saitama'
  elif (n == u'札幌' or n == u'北海道'):
    return 'sapporo'
  elif (n == u'東京' or n == u'関東'):
    return 'tokyo'
  elif (n == u'大阪' or n == u'関西'):
    return 'osaka'
  elif (n == u'名古屋' or n == u'愛知' or n == u'中部'):
    return 'nagoya'
  elif (n == u'島根' or n == u'松江'):
    return 'matsue'
  elif (n == u'福岡' or n == u'九州'):
    return 'fukuoka'

  return None
